package com.xiaodou.mjf.entity.core;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xiaodou.mjf.entity.core.base.FinancingBase;

/***
 *
 * Financing实体定义
 * 
 * @author XiaoDou.com Code Generator
 * @version 1.0 2015-03-05 12:58:29
 *
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Financing extends FinancingBase implements Serializable {

	/** 序列化标识 */
	private static final long serialVersionUID = 8676233943083489839L;

	@Transient
	public String loanIds;

	@Transient
	public String refundAmount;
	@Transient
	public String useGuide;
	@Transient
	public String timeLimit;
	@Transient
	public String promise;
	@Transient
	public String agreementTitle;
	@Transient
	public String agreementUrl;

	// 售卖中
	public static Integer INVEST_STATUS_SALE = 0;
	// 满标
	public static Integer INVEST_STATUS_FULL_SCALE = 1;
	// 还款中
	public static Integer INVEST_STATUS_REPAYMENT = 2;
	// 还款完成
	public static Integer INVEST_STATUS_PAID = 3;
	// 流标
	public static Integer INVEST_STATUS_FAIL = 4;
	// 满标待放款
	public static Integer INVEST_STATUS_FOR_LOAN = 5;
	// 下架
	public static Integer INVEST_STATUS_DOWN = 6;

	public static Integer TYPE_MEILI = 1;
	public static Integer TYPE_XIAODOU = 2;

	public static String IMAGE_PATH = "financing";

	public String getUseGuide() {
		return useGuide;
	}

	public void setUseGuide(String useGuide) {
		this.useGuide = useGuide;
	}

	public String getTimeLimit() {
		return timeLimit;
	}

	public void setTimeLimit(String timeLimit) {
		this.timeLimit = timeLimit;
	}

	public String getPromise() {
		return promise;
	}

	public void setPromise(String promise) {
		this.promise = promise;
	}

	public String getAgreementTitle() {
		return agreementTitle;
	}

	public void setAgreementTitle(String agreementTitle) {
		this.agreementTitle = agreementTitle;
	}

	public String getAgreementUrl() {
		return agreementUrl;
	}

	public void setAgreementUrl(String agreementUrl) {
		this.agreementUrl = agreementUrl;
	}

	public Financing() {
	}

	public Financing(String id) {
		this.id = id;
	}

	public String getRefundAmount() {
		return refundAmount;
	}

	public void setRefundAmount(String refundAmount) {
		this.refundAmount = refundAmount;
	}

	@Override
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getStartTime() {
		// TODO Auto-generated method stub
		return super.getStartTime();
	}

	@Override
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getEndTime() {
		return super.getEndTime();
	}

	public String getLoanIds() {
		return loanIds;
	}

	public void setLoanIds(String loanIds) {
		this.loanIds = loanIds;
	}

}
